package cn.org.authority.dao;

import cn.org.authority.bean.Role;
import cn.org.authority.comm.dao.CommMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName RoleMapper
 * @Author swj
 * @Date 2020/9/9 20:34
 */
@Mapper
public interface RoleMapper  extends CommMapper<Role> {

    @Select("select r.* from au_role r ,au_user_role ur where r.id = ur.rid and ur.uid = #{uid}")
    List<Role> getRolebyUser(Integer uid);
}
